﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Circle.Web.ViewModels;
using Circle.Web.ViewModelsClient;
using System.Linq.Expressions;
using Circle.Domain.Entity;
using Circle.Domain.Model;
using Circle.Website.ViewModels;

namespace Circle.Web.Drivers.Contract
{
    public interface ITopicDriver : IEntityConvertableDriver<ContentTopic, TopicClientModel>, 
        ISavableDriver<ContentTopic, TopicClientModel>
    {

        PageListClient<TopicClientModel> PagingClientTopics(int pageSize, PageTopicFilterClient filter);
        PageListClient<TopicClientModel> PagingMyClientTopics(int pageIndex, int pageSize, string sort);

        TopicWithComments GetTopicWithComments(Guid topicId, int pageIndex, int CommentsPerPage);
        TopicWithCommentsClient ToTopicWithCommentsClient(TopicWithComments topicWithComments);

        PageListClient<CommentClientModel> GetPageComments(Guid id, int pageIndex, int pageSize);

        bool HasPermission(EntityPermission permission, ContentTopic contentTopic = null, Guid? threadId = null);
    }
}
